<?php
use yii\grid\GridView;
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */

$this->title = '用户明细';
?>

<?= Html::a('新增用户', Url::to(['site/add'])) ?>
<?= GridView::widget([
    'summary' => '当前第{page}页，共{pageCount}页',
    'dataProvider' => $dataProvider,
    'columns' => [
        'id',
        'username',
        'email',
        [
            'attribute' => 'created_at',
            'value' => function($data){
                return $data->getCreatdAtText();
            }
        ],
        [
            'attribute' => 'updated_at',
            'value' => function($data){
                return $data->getUpdatedAtText();
            }
        ],
        [
            'attribute' => 'status',
            'value' => function($data){
                return $data->getStatusText();
            }
        ],
    ],
]); ?>
